<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="userList.title"/></title>
    <meta name="heading" content="<fmt:message key='userList.heading'/>"/>
    <meta name="menu" content="UserMenu"/>
</head>

<div id="search">
<form method="get" action="${ctx}/users" id="searchForm">
    <input type="text" size="20" name="q" id="query" value="${param.q}"
           placeholder="Enter search terms..."/>
    <input type="submit" value="<fmt:message key="button.search"/>"/>
</form>
</div>

<input type="button" style="margin-right: 5px" class="button" onclick="location.href='<c:url value="/editUser"/>'" value="<fmt:message key="button.add"/>"/>
<input type="button" class="button" onclick="location.href='<c:url value="/mainMenu"/>'" value="<fmt:message key="button.done"/>"/>

<display:table name="users" class="table" requestURI="" id="userList" export="true" pagesize="25">
    <display:column property="id" sortable="true" href="editUser" media="html"
        paramId="id" paramProperty="id" titleKey="user.id"/>
    <display:column property="id" media="csv excel xml pdf" titleKey="user.id"/>
    <display:column property="address" sortable="true" titleKey="user.address"/>
    <display:column property="avatar" sortable="true" titleKey="user.avatar"/>
    <display:column property="birthDay" sortable="true" titleKey="user.birthDay"/>
    <display:column property="birthMonth" sortable="true" titleKey="user.birthMonth"/>
    <display:column property="birthType" sortable="true" titleKey="user.birthType"/>
    <display:column property="birthYear" sortable="true" titleKey="user.birthYear"/>
    <display:column property="blood" sortable="true" titleKey="user.blood"/>
    <display:column property="city" sortable="true" titleKey="user.city"/>
    <display:column property="code" sortable="true" titleKey="user.code"/>
    <display:column property="communication" sortable="true" titleKey="user.communication"/>
    <display:column property="constellation" sortable="true" titleKey="user.constellation"/>
    <display:column property="country" sortable="true" titleKey="user.country"/>
    <display:column property="deptAddress" sortable="true" titleKey="user.deptAddress"/>
    <display:column property="deptName" sortable="true" titleKey="user.deptName"/>
    <display:column property="description" sortable="true" titleKey="user.description"/>
    <display:column property="displayName" sortable="true" titleKey="user.displayName"/>
    <display:column property="email" sortable="true" titleKey="user.email"/>
    <display:column property="gender" sortable="true" titleKey="user.gender"/>
    <display:column property="mobilephone" sortable="true" titleKey="user.mobilephone"/>
    <display:column property="nickName" sortable="true" titleKey="user.nickName"/>
    <display:column property="password" sortable="true" titleKey="user.password"/>
    <display:column property="phone" sortable="true" titleKey="user.phone"/>
    <display:column property="position" sortable="true" titleKey="user.position"/>
    <display:column property="profession" sortable="true" titleKey="user.profession"/>
    <display:column property="province" sortable="true" titleKey="user.province"/>
    <display:column property="regMode" sortable="true" titleKey="user.regMode"/>
    <display:column property="regTime" sortable="true" titleKey="user.regTime"/>
    <display:column property="roleId" sortable="true" titleKey="user.roleId"/>
    <display:column property="sensation" sortable="true" titleKey="user.sensation"/>
    <display:column property="status" sortable="true" titleKey="user.status"/>
    <display:column property="username" sortable="true" titleKey="user.username"/>
    <display:column property="version" sortable="true" titleKey="user.version"/>

    <display:setProperty name="paging.banner.item_name"><fmt:message key="userList.user"/></display:setProperty>
    <display:setProperty name="paging.banner.items_name"><fmt:message key="userList.users"/></display:setProperty>

    <display:setProperty name="export.excel.filename"><fmt:message key="userList.title"/>.xls</display:setProperty>
    <display:setProperty name="export.csv.filename"><fmt:message key="userList.title"/>.csv</display:setProperty>
    <display:setProperty name="export.pdf.filename"><fmt:message key="userList.title"/>.pdf</display:setProperty>
</display:table>

<input type="button" style="margin-right: 5px" class="button" onclick="location.href='<c:url value="/editUser"/>'" value="<fmt:message key="button.add"/>"/>
<input type="button" class="button" onclick="location.href='<c:url value="/mainMenu"/>'" value="<fmt:message key="button.done"/>"/>

<script type="text/javascript">
    highlightTableRows("userList");
</script>
